import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "../views/HomeView.vue";
import sort from "../views/SortView.vue";
import login from "../views/loginView.vue";
import shopping from "../views/shoppingView.vue";
import jingxi from "../views/jingView.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: HomeView,
  },
  {
    path: "/sort",
    component: sort,
  },
  {
    path: "/login",
    component: login,
  },
  {
    path: "/shopping",
    component: shopping,
  },
  {
    path: "/jingxi",
    component: jingxi,
  },
  {
    path: "/search",
    component: () => import("../views/searchView.vue"),
  },
  {
    path: "/goods",
    component: () => import("../views/goodsView.vue"),
  },
];

const router = new VueRouter({
  routes,
});

export default router;
